Skip to content

Python: exclude loops from varBlockStep#14446

Closed
yoff wants to merge 2 commits intogithub:mainfrom
yoff:python/address-dataflow-consistencies
Closed

Python: exclude loops from varBlockStep#14446
yoff wants to merge 2 commits intogithub:mainfrom
yoff:python/address-dataflow-consistencies

Conversation

@yoff
Copy link
Copy Markdown
Contributor

@yoff yoff commented Oct 11, 2023

I tracked the "flow to self" to be in "use to next use", specifically adjacentUseUseSameVar can hold when use1 = use2.
This because second conjunct (the non-base case with non-consecutive basic blocks) of adjacentVarRefs can become true when varBlockStep holds for a loop.

Changes on tests all look good. I would like to understand why this break is not necessary for other languages, though. Do they have other assumptions that we violate?

Edit: I did find this similar restriction in C#, but they do it on the dataflow level. So the question is perhaps more, where the restriction should best be put.

Edit2: Reached out to other language teams, and likely the restriction should be on the dataflow level. The reason is that we actually want to preserve self-loops on the SSA level, since a self loop from x to x should lead to a dataflow step from [post] x to x (but not to a dataflow step from x to x). I will pursue this solution in a different PR.

I tracked the "flow to self" to be in "use to next use",
specifically `adjacentUseUseSameVar` can hold when
`use1` = `use2`.
This because `adjacentVarRefs` can in its second conjunct
when `varBlockStep` holds for a loop.
@yoff
Copy link
Copy Markdown
Contributor Author

yoff commented Oct 31, 2023

Closed in favour of #14644

@yoff yoff closed this Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant